# Contributor: Patrycja Rosa <alpine@ptrcnull.me>
# Maintainer: Patrycja Rosa <alpine@ptrcnull.me>
pkgname=py3-myst-parser
pkgver=0.18.0
pkgrel=0
pkgdesc="Extended commonmark compliant parser"
url="https://myst-parser.readthedocs.io/"
arch="noarch"
license="MIT"
depends="
	py3-docutils
	py3-jinja2
	py3-markdown-it-py
	py3-mdit-py-plugins
	py3-sphinx
	py3-typing-extensions
	py3-yaml
	python3
	"
makedepends="py3-build py3-flit-core py3-installer"
checkdepends="py3-pytest py3-pytest-benchmark py3-beautifulsoup4"
source="https://github.com/executablebooks/MyST-Parser/archive/v$pkgver/py3-myst-parser-$pkgver.tar.gz"
builddir="$srcdir/MyST-Parser-$pkgver"
options="!check" # TODO

build() {
	python3 -m build --no-isolation --wheel
}

check() {
	PYTHONPATH=build/lib pytest
}

package() {
	python3 -m installer -d "$pkgdir" \
		dist/myst_parser-$pkgver-py3-none-any.whl
}

sha512sums="
919494467de3f0cd97c9c8062626b88c22fd0596e120b7ca117b8bce18d9fad9faf06a36e4c5bd8a4dad838c888524c780beceaf3e7acb42232bd3c903fabc3f  py3-myst-parser-0.18.0.tar.gz
"
